<template>
    <div class="header">
        <div class="header-left">
            <div class="iconfont back-icon">&#xe624;</div>
        </div>
        <div class="header-middle">
            <input type="text" placeholder="输入城市/景点/游玩主题">
        </div>
        <router-link to="/City">
            <div class="header-right">
                <span>{{this.city}}</span>
            </div>
        </router-link>
    </div>
</template>
<script>

import { mapState } from 'vuex'
export default {
  nane: 'HomeHeader',
  computed: {
    ...mapState(['city'])
  }
}
</script>
<style lang="stylus" scoped>
.header {
    display: flex;
    height: 0.86rem;
    background: #00bcd4;
    color: #fff;
    line-height: 0.86rem;
}

.header-left {
    width: 0.64rem;
    float: left;
}

.header-middle {
    flex: 1;
    width: 1.24rem;
    text-align: center;
    height: 0.64rem;
    line-height: 0.65rem;
    border-radius: 0.25rem;
    background: #fff;
    margin: 0.12rem 0;
}

.header-right {
    min-width: 1.04rem;
    padding: 0 0.1rem;
    float: right;
    text-align: center;
    color: #fff;
}
</style>
